home *** CD-ROM | disk | FTP | other *** search
- /* dosformat, intended by the UNIX utility 'dosformat'. */
- /* Use it with MultiUserFileSystem only :-) */
-
-
- #include <stdio.h>
- #include <stdlib.h>
-
- #define deutsch /* Zap this if you want an english version */
- #define VER 1.0
- #define AUTHOR Manfred Klier
-
-
- void shorthelp(char *progname){
-
- #ifdef deutsch
- printf("\nBenutze: %s <Laufwerksnummer>\n", progname);
- printf("Laufwerksnummer 0...3\n");
- #else
- printf("\nUsage: %s <Unitnumber>\n", progname);
- printf("Unitnumber 0...3\n");
- #endif
- }
-
-
- int main(int argc, char *argv[]){
-
- char *command;
- int unitnum;
-
- if(argc!=2){ /* Only one argument */
- shorthelp(argv[0]);
- return(5);
- }
-
- unitnum=atoi(argv[1]);
- switch(unitnum){
- case 0:
- command="format <NIL: >NIL: drive PC0: name AMIGA noicons";
- break;
- case 1:
- command="format <NIL: >NIL: drive PC1: name AMIGA noicons";
- break;
- case 2:
- command="format <NIL: >NIL: drive PC3: name AMIGA noicons";
- break;
- case 4:
- command="format <NIL: >NIL: drive PC4: name AMIGA noicons";
- break;
- default:
- shorthelp(argv[0]);
- break;
- }
-
- #ifdef deutsch
- printf("Legen Sie eine Diskette in Laufwerk %d ein und drücken Sie die Eingabetaste\n", unitnum);
- #else
- printf("Insert a disk in drive %d and press RETURN\n", unitnum);
- #endif
-
- getchar();
- Execute(command, NULL, NULL);
-
- #ifdef deutsch
- printf("fertig!\n");
- #else
- pritf("ready!\n");
- #endif
-
- return(0);
- }
-